package com.szlanyou.thirdsdk.retrofit.file.download;
import com.szlanyou.thirdsdk.retrofit.client.HttpClient;
import io.reactivex.Observable;
import okhttp3.ResponseBody;

/**
 * @author 陈章
 * create at 2020/11/23 10:09
 * desc:创建文件下载的Observable
 */
public class FileDownloadObservableGenerator {
  /*  public static   ResponseBodyObservable create(String downloadUrl) {
        DownloadFileService service = RetrofitClient.getService(DownloadFileService.class);
        return service.downloadFile(downloadUrl);
    }*/

    public static   Observable<ResponseBody> create(HttpClient httpClient,String downloadUrl) {
        DownloadFileService service = httpClient.getRetrofitClient().getService(DownloadFileService.class);
        return service.downloadFile(downloadUrl);
    }
}
